import request from '@/utils/request'

/**
 * 获取手机验证码
 * @param params
 * @returns {*}
 */
export function getSendCode(params) {
  return request({
    url: '/login/sendCode',
    params,
    method: 'get'
  })
}

/**
 * 用户登陆
 * @param params
 * @returns {*}
 */
export function postLoginCode(params) {
  return request({
    url: '/login/code',
    params,
    method: 'post'
  })
}

/**
 * 用户登陆(免登录)
 * @param params
 * @returns {*}
 */
export function postLoginPatientDetails(params) {
  return request({
    url: '/login/patientDetails/index',
    params,
    method: 'post'
  })
}

export function logout(params) {
  return request({
    url: '/login/logOut',
    method: 'get',
    params
  })
}

export function getUserInfo() {
  return request({
    url: '/login/info',
    method: 'get'
  })
}

